package com.wzy.xxgl.service.impl;

import java.util.List;
import com.wzy.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.wzy.xxgl.mapper.XxglSxxxMapper;
import com.wzy.xxgl.domain.XxglSxxx;
import com.wzy.xxgl.service.IXxglSxxxService;

/**
 * 实习信息Service业务层处理
 * 
 * @author wzy
 * @date 2025-10-13
 */
@Service
public class XxglSxxxServiceImpl implements IXxglSxxxService 
{
    @Autowired
    private XxglSxxxMapper xxglSxxxMapper;

    /**
     * 查询实习信息
     * 
     * @param sxxxId 实习信息主键
     * @return 实习信息
     */
    @Override
    public XxglSxxx selectXxglSxxxBySxxxId(Long sxxxId)
    {
        return xxglSxxxMapper.selectXxglSxxxBySxxxId(sxxxId);
    }

    /**
     * 根据导师ID查询对应实习的学生下拉框数据
     *
     * @param teacherId 导师ID
     * @return 实习信息集合
     */
     @Override
    public List<XxglSxxx> getStudentDataByTeacherId(Long teacherId)
    {
        return xxglSxxxMapper.getStudentDataByTeacherId(teacherId);
    }

    /**
     * 查询实习信息列表
     * 
     * @param xxglSxxx 实习信息
     * @return 实习信息
     */
    @Override
    public List<XxglSxxx> selectXxglSxxxList(XxglSxxx xxglSxxx)
    {
        return xxglSxxxMapper.selectXxglSxxxList(xxglSxxx);
    }

    /**
     * 新增实习信息
     * 
     * @param xxglSxxx 实习信息
     * @return 结果
     */
    @Override
    public int insertXxglSxxx(XxglSxxx xxglSxxx)
    {
        xxglSxxx.setCreateTime(DateUtils.getNowDate());
        return xxglSxxxMapper.insertXxglSxxx(xxglSxxx);
    }

    /**
     * 修改实习信息
     * 
     * @param xxglSxxx 实习信息
     * @return 结果
     */
    @Override
    public int updateXxglSxxx(XxglSxxx xxglSxxx)
    {
        xxglSxxx.setUpdateTime(DateUtils.getNowDate());
        return xxglSxxxMapper.updateXxglSxxx(xxglSxxx);
    }

    /**
     * 批量删除实习信息
     * 
     * @param sxxxIds 需要删除的实习信息主键
     * @return 结果
     */
    @Override
    public int deleteXxglSxxxBySxxxIds(Long[] sxxxIds)
    {
        return xxglSxxxMapper.deleteXxglSxxxBySxxxIds(sxxxIds);
    }

    /**
     * 删除实习信息信息
     * 
     * @param sxxxId 实习信息主键
     * @return 结果
     */
    @Override
    public int deleteXxglSxxxBySxxxId(Long sxxxId)
    {
        return xxglSxxxMapper.deleteXxglSxxxBySxxxId(sxxxId);
    }
}
